package com.balabala.gym_goods.config;

import com.balabala.goods.constant.KafkaConstant;
import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author 何涛
 * @Date: 2023/05/10/ 11:56
 * @description kafka主题配置分区和副本
 */
@Configuration
public class KafkaTopicConfig {
    @Bean
    public NewTopic initNewTopic()
    {
        return new NewTopic(KafkaConstant.COURSE_CARD_CLEAR,3, (short) 1);
    }
}
